﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microsoft.MediaPlayer.Interop {
	public enum HResult: int {
		S_OK = 0,
		S_FALSE = 1,
		E_NOTIMPL = unchecked((int)0x80004001),
		E_FAIL = unchecked((int)0x80004005),
	}

	internal enum PluginProperty {
		CurrentPreset,
		PresetCount,
		PresetNames,
		QueryDestroy,
		DefaultHeight,
		DefaultWidth,
		MaxHeight,
		MaxWidth,
		MinHeight,
		MinWidth,
		Resizable
	}

	internal static class WMPConstants {
		public static readonly string PLUGIN_MISC_CURRENTPRESET = PluginProperty.CurrentPreset.ToString();
		public static readonly string PLUGIN_MISC_PRESETCOUNT = PluginProperty.PresetCount.ToString();
		public static readonly string PLUGIN_MISC_PRESETNAMES = PluginProperty.PresetNames.ToString();
		public static readonly string PLUGIN_MISC_QUERYDESTROY = PluginProperty.QueryDestroy.ToString();
		public static readonly string PLUGIN_SEPARATEWINDOW_DEFAULTHEIGHT = PluginProperty.DefaultHeight.ToString();
		public static readonly string PLUGIN_SEPARATEWINDOW_DEFAULTWIDTH = PluginProperty.DefaultWidth.ToString();
		public static readonly string PLUGIN_SEPARATEWINDOW_MAXHEIGHT = PluginProperty.MaxHeight.ToString();
		public static readonly string PLUGIN_SEPARATEWINDOW_MAXWIDTH = PluginProperty.MaxWidth.ToString();
		public static readonly string PLUGIN_SEPARATEWINDOW_MINHEIGHT = PluginProperty.MinHeight.ToString();
		public static readonly string PLUGIN_SEPARATEWINDOW_MINWIDTH = PluginProperty.MinWidth.ToString();
		public static readonly string PLUGIN_SEPARATEWINDOW_RESIZABLE = PluginProperty.Resizable.ToString();
		public const string PLUGIN_INSTALLREGKEY = @"Software\Microsoft\MediaPlayer\UIPlugins";
		public const string PLUGIN_INSTALLREGKEY_FRIENDLYNAME = "FriendlyName";
		public const string PLUGIN_INSTALLREGKEY_DESCRIPTION = "Description";
		public const string PLUGIN_INSTALLREGKEY_CAPABILITIES = "Capabilities";
		public const string PLUGIN_INSTALLREGKEY_UNINSTALL = "UninstallPath";
	}

	internal enum PluginType {
		PLUGIN_TYPE_BACKGROUND = 0x1,
		PLUGIN_TYPE_SEPARATEWINDOW = 0x2,
		PLUGIN_TYPE_DISPLAYAREA = 0x3,
		PLUGIN_TYPE_SETTINGSAREA = 0x4,
		PLUGIN_TYPE_METADATAAREA = 0x5
	}

	[Flags]
	internal enum PluginFlags: int {
		PLUGIN_FLAGS_HIDDEN = 0x02000000,
		PLUGIN_FLAGS_HASPRESETS = 0x04000000,
		PLUGIN_FLAGS_ACCEPTSPLAYLISTS = 0x08000000,
		PLUGIN_FLAGS_ACCEPTSMEDIA = 0x10000000,
		PLUGIN_FLAGS_LAUNCHPROPERTYPAGE = 0x20000000,
		PLUGIN_FLAGS_INSTALLAUTORUN = 0x40000000,
		PLUGIN_FLAGS_HASPROPERTYPAGE = unchecked((int)0x80000000)
	}
}
